<%@page import="java.util.List"%>
<%@include file="head.jsp" %>
<div id="container" class="showEnterprises">
  <div id="content">
    <h1>All Enterprises</h1>
    <table class="lists">
      <thead>
      <tr>
          <th>Name</th>
          <th>E-mail</th>
          <th>Street</th>
          <th>Country</th>
          <th>Zip</th>
          <th>City</th>
          <th>Num Siret</th>
        </tr>
      </thead>
      <tfoot>
      <tr>
          <th>Name</th>
          <th>E-mail</th>
          <th>Street</th>
          <th>Country</th>
          <th>Zip</th>
          <th>City</th>
          <th>Num Siret</th>
        </tr>
      </tfoot>
      <tbody>
        <%
          List lists = (List) request.getAttribute("listofrecords");
          for (int i = 0; i < lists.size(); i++) {
            Object[] list = (Object[])lists.get(i);
            if(i%2 ==1){
              out.println("<tr class=\"odd\">");
            } else {
              out.println("<tr>");
            }
            for (int j = 0; j < list.length; j++) {
              out.println("<td>");
              out.println(list[j]);
              out.println("</td>");
            }
            out.println("</tr>");
          }
        %>
      </tbody>
    </table>
    <form method="get" action="ListRecordsServlet">

     <p class="submit"><input type="submit" value="Return"></p>

</form>
  </div>
</div>
<%@include file="foot.jsp" %>